<?php
class InfoController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    	Zend_Loader::loadClass('UserModel');
    	Zend_Loader::loadClass('WallModel');
    	Zend_Loader::loadClass('FriendModel');
 
    	$auth = Zend_Auth::getInstance();
    	if (!$auth->getIdentity()->id) $this->_redirect('/');
    	else {
    		$this->viewer = $auth->getIdentity()->username;
    		$this->viewer_id = $auth->getIdentity()->id;
    	}
    }
    
    public function descriptionAction(){
    	$description = $this->_request->getParam('description_e');
    	$username = $this->_request->getParam('username');
    	UserModel::editdescription($this->viewer_id,$description);
    }
}